#include<stdio.h>
#include<string.h> 
int main(){
	char x;
	int n=1;
	while(n==1){
	scanf("%c",&x);
	switch(x){
	case 'A':
      printf("90-100\n");
	  break;
	case 'a':
	  printf("90-100\n");
	  break;
	case 'B':
	  printf("80-90\n");
	  break;
	case 'b':
	  printf("80-90\n");
	  break;
	case 'C':
	  printf("70-80\n");
	  break;
	case 'c':
	  printf("70-80\n");
	  break;
	case 'D':
	  printf("60-70\n");
	  break;
	case 'd':
	  printf("60-70\n");
	  break;
	case '0':
	  n=0;
	  break;
	  case '\n':n=1;
	  break;
	default : printf("ERROR!\n");
  }
 }
 return 0;
}
